package com.example.studentmanagement2.model;

import jakarta.persistence.Column;
import jakarta.persistence.Entity;
import jakarta.persistence.Id;
import jakarta.persistence.Table;
import lombok.AllArgsConstructor;
import lombok.Data;
@Entity
@AllArgsConstructor // 添加Lombok全参构造注解
@Data
@Table(name = "students")  // 确保表名匹配
public class Student {
    @Id
    private String id;
    private String name;
    @Column(name = "class_name")  // 映射到数据库的 class_name 字段
    private String className;

    public Student() {}
}